<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
$intLTypeID = (int)$_data["LTypeID"];
if($intLTypeID == 0){
	$GLOBALS["errormessage"] = "Data Data Error!!";
	ErrMsgOutputHTML("Error", "", 1);
}
$arrALine = $_data["ALine"];
$arrBLine = $_data["BLine"];
$arrCLine = $_data["CLine"];

$strBT = "";
if(is_array($arrALine)){
	foreach($arrALine as $intBT => $arrAL){
		foreach($arrAL as $intApNum => $flALine){
			$data["LType_n"] = $intLTypeID;
			$data["BetType_n"] = (int)$intBT;
			$data["ApointNum_n"] = (int)$intApNum;
			$data["ALine_x"] = (float)$flALine;
			$data["BLine_x"] = (float)$arrBLine[$intBT][$intApNum];
			$data["CLine_x"] = (float)$arrCLine[$intBT][$intApNum];
			$strBT .= "&BetType[]=".$intBT;
			
			if(!InsertSQL( $data, "bet_SelectGambleType", $data_o)){
				ErrMsgOutputHTML("Error", "", 1);
			}
		}
	}
}

@mysql_close($$_Conn);
header("Location: ".basename($_SERVER["PHP_SELF"])."?op=Lists&LTypeID=".$intLTypeID.$strBT);
exit();
?>